﻿#region Copyright Statement
//  ------------------------------------------------------------------------------
//  
//    This file is part of The Streambolics Library.
//    Copyright © 2005-2010, Stephan Leclercq & Streambolics
//    All rights reserved.
//  
//    The Streambolics Library is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 2 of the License, or
//    (at your option) any later version.
//  
//    The Streambolics Library is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//  
//    You should have received a copy of the GNU General Public License
//    along with Streambolics; if not, write to the Free Software
//    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//  
//  ------------------------------------------------------------------------------
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Streambolics
{
    /// <summary>
    ///     A data file
    /// </summary>
    /// <remarks><para>
    ///     There is little use for the File class itself. It is mainly a
    ///     way to incorporate the FileInfo structure. It would have been an order
    ///     of magnitude simpler to be able to derive from FileInfo, but alas
    ///     this is not possible.
    /// </para></remarks>

    public class DataFile
    {
        private string _Name;
        private FileInfo _FileInfo;

        public DataFile (string aName)
        {
            _Name = aName;
        }

        public string Name
        {
            get
            {
                return _Name;
            }
        }

        public FileInfo FileInfo
        {
            get
            {
                if (_FileInfo == null)
                {
                    _FileInfo = new FileInfo (_Name);
                }
                return _FileInfo;
            }
        }
    }
}
